package demo.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import demo.dao.IProductDao;
import demo.model.Product;


@Controller
@RequestMapping("mall/product")
public class MallProductController {
	
	@Resource
	private IProductDao productDao;
	
	//��ѯ���ձ���
	@RequestMapping("/findToday.do")
	@ResponseBody
	public List<Product> findToday(){
		return productDao.findToday();
	}
	
	//�鿴��Ʒ����
	@RequestMapping("/findById.do")
	@ResponseBody
	public Product findById(int id) {
		return productDao.findById(id);
	}
}

